fix(rsr): finish template instantiation + enforce it (#56) - #90
Conversation
Closes both acceptance criteria of #56, though the second turned out to be already satisfied and the first was mis-scoped. ## Criterion 1 — template residue The issue recorded "5 {{PLACEHOLDER}} files + 8 rsr-template-repo references". Re-measured: 8 files matched `{{...}}` and 21 lines matched the template name — but most were META-REFERENCES, files describing the debt rather than carrying it. Three would have been damaged by a naive search-and-replace: * src/rust/src/eval.rs — `"...add{{}} block"` is a Rust format! ESCAPE (`{{}}` renders as literal `{}`) naming the `add{}` language construct. It is working code. * methodology.a2ml — the token appears inside reject-if-contains, the rule that FORBIDS it. * AFFIRMATION.adoc, docs/identity-fabric/ — prose recording the debt. The genuine residue, now cleared: * QUICKSTART-MAINTAINER: {{DEPS}}, {{BUILD_OUTPUT_PATH}}, {{PACKAGE_NAME}} * QUICKSTART-DEV: {{LANG_STACK}}, {{BUILD_CMD}}, {{TEST_CMD}}, {{MUST_INVARIANTS}} * methodology.a2ml: {{PROJECT_UNIQUE_STRENGTH}} * Intentfile / Trustfile / Mustfile / Adjustfile — whose SUBJECT was still the template. Intentfile asserted "This repository is the canonical template for Rhodium Standard Repository compliance." * docs/CITATIONS.adoc — every format credited "Polymath, Hyper" for "RSR-template-repo", wrong project and wrong author. ## A worse class, found while fixing it All three QUICKSTARTs documented commands that DO NOT EXIST: `just build`, `just test`, `just lint`, `just panic-scan`, `just setup-dev`, `just build-release`, `just install`, `just run`, `just heal`, `just setup`, `just uninstall`, `just stapeln-run` — and asserted an `$XDG_CONFIG_HOME/tangle/config.toml` the compiler never reads, plus a "Multi-Instance Deployment" section for what is a single stateless binary. Documentation that fails when followed is worse than none. Every command now shown is verified to exist, and the one worked example's output is the REAL output (8 `assertion passed` lines, exit 0) rather than the template's invented "Tangle started successfully." ## Criterion 2 — already satisfied The stack-diagram reconciliation was done by #78: README.adoc carries the correction and AFFIRMATION.adoc has "Erratum — 2026-07-21 / Correction 1 — the stack does not exist". Note the criterion as worded ("does the simplified diagram supersede, or re-state, the nuance?") presupposed the stack was real; both options were wrong, because `KRL -> TangleIR -> ...` describes a dependency that never existed. Withdrawn, not reconciled. ## Making the rule real methodology.a2ml has always declared `reject-if-contains = [..., "rsr-template-repo"]` and NOTHING enforced it, which is how the contractiles stayed mis-instantiated. Adds scripts/check-rsr-instantiation.sh (+ `just rsr-check`, + a CI step) which enforces it, using an explicit allowlist so legitimate meta-references and the Rust escape are not false-positived. Verified adversarially: reintroducing a placeholder, claiming to be the template, and documenting a phantom recipe are each caught; the Rust format! escape is correctly ignored. The guard found a file I had not inspected (QUICKSTART-USER.adoc, six phantom recipes) on its first run. AFFIRMATION.adoc gains a dated Erratum — 2026-07-29 (Corrections 3-5) recording the residue clearance, that the OCaml compiler is no longer unbuilt (#87/#89), and that `==` is no longer list equality (#50/#87). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The RSR guard's second half checks that every `just <recipe>` named in the docs exists. On the runner `just` was absent, so it emitted its warning and SKIPPED — announcing itself rather than silently passing, but skipping all the same. A check that never executes in CI is half a gate, and this is the exact half that would have caught the twelve phantom recipes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Note Automatic reviews are paused because your trial's included automatic processing has been used for this period. Upgrade now, or comment "Gitar review" to run a review anytime. Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar
Closes both acceptance criteria of #56 — though the second was already satisfied, and the first was mis-scoped.
Criterion 1 — template residue
The issue recorded "5
{{PLACEHOLDER}}files + 8rsr-template-reporeferences". Re-measured: 8 files matched{{...}}and 21 lines matched the template name — but most were meta-references: files describing the debt, not carrying it.Three would have been damaged by a naive search-and-replace:
src/rust/src/eval.rs"...add{{}} block"is a Rustformat!escape —{{}}renders as a literal{}, naming theadd{}language construct. Working code.methodology.a2mlreject-if-contains— the rule that forbids it.AFFIRMATION.adoc,docs/identity-fabric/The genuine residue, now cleared:
{{DEPS}},{{BUILD_OUTPUT_PATH}},{{PACKAGE_NAME}},{{LANG_STACK}},{{BUILD_CMD}},{{TEST_CMD}},{{MUST_INVARIANTS}},{{PROJECT_UNIQUE_STRENGTH}}— plus four contractiles and the citation guide whose subject was still the template.Intentfileasserted "This repository is the canonical template for Rhodium Standard Repository compliance";CITATIONS.adoccredited "Polymath, Hyper" for "RSR-template-repo" in all five citation formats.A worse class, found while fixing it
All three QUICKSTARTs documented commands that do not exist —
just build,just test,just lint,just panic-scan,just setup-dev,just build-release,just install,just run,just heal,just setup,just uninstall,just stapeln-run— asserted an$XDG_CONFIG_HOME/tangle/config.tomlthe compiler never reads, and carried a "Multi-Instance Deployment" section for what is a single stateless binary.Documentation that fails when followed is worse than none. Every command now shown is verified to exist, and the worked example shows the real output (8
assertion passedlines, exit 0) rather than the template's inventedTangle started successfully.Criterion 2 — already satisfied by #78
README.adoccarries the correction andAFFIRMATION.adochas "Erratum — 2026-07-21 / Correction 1 — the stack does not exist".Worth noting: the criterion as worded — "does the simplified diagram supersede, or re-state, the nuance?" — presupposed the stack was real. Both options were wrong.
KRL → TangleIR → …describes a dependency that never existed (TangleIRappears in no source file in either repo). It was withdrawn, not reconciled.Making the rule real
methodology.a2mlhas always declaredreject-if-contains = [..., "rsr-template-repo"]— and nothing enforced it, which is precisely how the contractiles stayed mis-instantiated. Addsscripts/check-rsr-instantiation.sh(plusjust rsr-checkand a CI step), using an explicit allowlist so meta-references and the Rust escape aren't false-positived.Verified adversarially:
{{PLACEHOLDER}}rsr-template-repojustrecipeformat!escapeadd{{}}It earned itself immediately: on first run it flagged
QUICKSTART-USER.adoc, a file I had not inspected, with six phantom recipes.Also
AFFIRMATION.adocgains a dated Erratum — 2026-07-29 (Corrections 3–5) recording the residue clearance, that the OCaml compiler is no longer unbuilt (#87/#89 — the previous erratum's closing line said it was), and that==is no longer list equality (#50/#87).All gates pass locally: build, corpus, rsr-check,
must-check,trust-verify.🤖 Generated with Claude Code